import { Panel } from 'comps/common';
import UnitDeployForm from './unit-deploy/unit-deploy-form';
import UnitDeployLogList from './unit-deploy/unit-deploy-log-list';

const UnitDeploy = ({ title, deployLogs, listDeployLog, fetching = false, ...otherProps }) => {
  return (
    <Panel title={`部署操作：${title}`} className='runnable-unit-deploy' spinner={fetching}>
      <div className='unit-deploy-panel'>
        <div className='unit-deploy-row'>
          <UnitDeployForm {...otherProps}/>
          <UnitDeployLogList onRefreshDeployLog={listDeployLog} deployLogs={deployLogs}/>
        </div>
      </div>
    </Panel>
  );
};

export default UnitDeploy;
